package it.terry.bussola;



import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;



public class Autocordsender extends Thread {

	
	@SuppressWarnings("unused")
	private Context ctx;
	private Handler handler;
	
	
	public Autocordsender(Context ctx, Handler handler){
		this.ctx = ctx;
		this.handler = handler;
	}
	@Override
	public void run(){
		
		
	        
	}
	public void set_cordinate(float x, float y, float z){
		float[] valori_buss = new float[3];
		valori_buss[0] = x;
		valori_buss[1] = y;
		valori_buss[2] = z;
		notifyMessage(valori_buss);
	}
	public void notifyMessage(float[] val){
		Message msg = handler.obtainMessage();
	    Bundle b = new Bundle();
	    b.putFloatArray("refresh", val);
	    msg.setData(b);
	    handler.sendMessage(msg);
	}
	
}
